<div class="m-nav">
    <div class="list" id="js_scroll" ng-init="scroll()">
        <div class="inner" id="scroller">
            <ul>
                <li ng-repeat="cate in categorys" ><a ng-class="{{cate.dishTypeId == tid}} ? 'z-sel': ''" href="#/list?tid={{cate.dishTypeId}}&tname={{cate.dishType}}">{{cate.dishType}}</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="u-loadding" ng-click="hasDish=true" ng-hide="hasDish"></div>
<div class="m-list" style="border-bottom:50px solid transparent;">
    <ul class="g-container">
        <li class="g-xs12 item" ng-repeat="dish in dishList track by $index">
        <div class="cover"><a href="javascript:;" ng-click="viewItem(dish)"><img ng-src="{{dish.imgUrls}}" alt=""/></a></div>
        <div class="text">
            <p class="name"><a ng-click="viewItem(dish)">{{dish.dishName}}</a><span class="z-te">特</span> <span class="z-tj">推</span></p>
            <div class="price">{{dish.price}} <span class="z-vip">vip</span><span class="vip">145.88元 </span></div>
            <div class="opt">
                <p class="integral"><span class="z-song">送</span>{{dish.amount}}</p>
                <div class="cart">
                    <span class="btn" ng-hide="cart[findIndex(dish.dishId)]" ng-click="addtoCart(dish.dishId,dish.dishName,dish.price,dish.vipPrice,dish.amount)">+</span>
                    <div class="count"  ng-show="cart[findIndex(dish.dishId)]">
                        <span class="reduce" ng-click="addtoCart(dish.dishId,dish.dishName,dish.price,dish.vipPrice,dish.amount,'reduce')">-</span>
                        <span class="num">{{cart[findIndex(dish.dishId)].quantity}}</span>
                        <span class="add" ng-click="addtoCart(dish.dishId,dish.dishName,dish.price,dish.vipPrice,dish.amount,'add')">+</span>
                    </div>
            </div>
            </div>
        </div>
       </li>
    </ul>
</div>

<div class="m-item"ng-show="itemDialog">
    <div class="mask" ng-click="itemDialog=false"></div>
    <div class="content">
        <div class="cover"><img ng-src="{{item.imgUrls}}" alt=""/></div>
        <div class="g-container">
            <div class="g-xs6">
                <p class="name">{{item.dishName}}<span class="z-te" ng-show="{{item.dishTejia}}">特</span> <span class="z-tj" ng-show="{{item.dishTuijian}}">推</span></p>
                <div class="price">￥{{item.price}} <span class="z-vip">vip</span><span class="vip">{{item.vipPrice}}元 </span></div>
                <p class="integral"><span class="z-song" ng-show="{{item.amount>0}}">送</span>{{item.amount}}</p>
            </div>
            <div class="g-xs6">
                <span class="btn" ng-hide="cart[findIndex(item.dishId)]" ng-click="addtoCart(item.dishId,item.dishName,item.price,item.vipPrice,item.amount)">+</span>
                <div class="count"  ng-show="cart[findIndex(item.dishId)]">
                    <span class="reduce" ng-click="addtoCart(item.dishId,item.dishName,item.price,item.vipPrice,item.amount,'reduce')">-</span>
                    <span class="num">{{cart[findIndex(item.dishId)].quantity}}</span>
                    <span class="add" ng-click="addtoCart(item.dishId,item.dishName,item.price,item.vipPrice,item.amount,'add')">+</span>
                </div>
            </div>
        </div>
    </div>
</div>

<div class="m-cart" ng-show="total" ng-class="{'z-sel':showCart}">
    <div class="list">
        <div class="tt f-tar" ng-click="showCart=false" ng-show="showCart">
            <span>我的点菜单</span>
            <i class="icon-font close" title="关闭">&#xe622;</i>
        </div>
        <div class="tt f-tac" ng-click="showCart=true" ng-hide="showCart">
            <i class="icon-font showDetails" title="展开">&#xe621;</i>
        </div>
        <ul class="g-container">
            <li class="f-cb" ng-repeat="item in cart track by $index">
                <div class="g-xs6">
                    <p class="name f-wwb">{{item.dishName}}</p>
                    <div class="price">{{item.price}} <span class="integral">积分</span></div>
                </div>
                <div class="g-xs6 f-tar">
                    <div class="count">
                        <span class="reduce" ng-click="addtoCart(item.id,item.dishName,item.price,item.vipPrice,item.amount,'reduce')">-</span>
                        <span class="num">{{item.quantity}}</span>
                        <span class="add" ng-click="addtoCart(item.id,item.dishName,item.price,item.vipPrice,item.amount,'add')">+</span>
                    </div>
                </div>
            </li>
        </ul>
    </div>
    <div class="bar">
        <div class="count">
            <span class="circle"><i class="icon-font" title="菜品">&#xe620;</i></span>
            <span class="num">{{qty}}</span>
        </div>
        <p class="total">{{total}}元，<span class="small">赠送：{{tocalAmount}}积分</span></p>
        <a ng-click="order()" class="btn f-wsn checkout">确定下单</a>
    </div>
</div>
<div scrolly="showMore()"></div>